$main-bg: #f5f7fa;
$card-shadow: 0 2px 8px #f0f1f2;
$radius: 6px;
$title-color: #222;
$text-color: #555;
$label-color: #333;
$primary-font: 16px;
$secondary-font: 15px;

.rules-container {
  padding: 16px;
  background-color: #f5f7fa;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  overflow: auto;
}
.section-title {
  font-weight: bold;
  font-size: $primary-font;
  margin-bottom: 16px;
  color: $title-color;
}
.current-rule-card,
.history-rule-card {
  margin-bottom: 22px;
  box-shadow: $card-shadow;
  border-radius: $radius;
  .rule-content {
    min-height: 100px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 18px 12px 18px;
    background: #fff;
    border-radius: $radius;
    position: relative;
    .rule-row {
      font-size: $secondary-font;
      color: $text-color;
      .label {
        color: $label-color;
        font-weight: 500;
        margin-right: 8px;
        white-space: nowrap;
      }
      .value {
        word-break: break-all;
      }
    }
    .edit-btn {
      min-width: 90px;
      margin-left: 24px;
      align-self: flex-start;
    }
  }
}
.history-rule-card {
  .history-list {
    background: #fff;
    border-radius: $radius;
    padding: 18px 18px 0 18px;
    .history-item {
      margin-bottom: 0;
      .history-row {
        font-size: $secondary-font;
        color: $text-color;
        margin-bottom: 6px;
        .label {
          color: $label-color;
          font-weight: 500;
          margin-right: 8px;
          white-space: nowrap;
        }
        .value {
          word-break: break-all;
        }
      }
      .el-divider {
        margin: 18px 0 12px 0;
      }
    }
  }
}
.pagination-bar {
  display: flex;
  justify-content: center;
  margin: 18px 0 0 0;
}
.pagination-container {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .total-count {
    color: #606266;
    font-size: 13px;
  }
  :deep(.el-pagination) {
    position: unset;
  }
}

.department-dialog {
  .el-dialog__header {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    padding-bottom: 0;
    letter-spacing: 2px;
  }
  .el-dialog__body {
    padding: 32px 32px 0 32px;
  }
  .dialog-form {
    .el-form-item {
      margin-bottom: 22px;
      align-items: flex-start;
      .el-form-item__label {
        font-weight: 500;
        color: #333;
        font-size: 15px;
        white-space: nowrap;
        line-height: 32px;
        width: 120px;
        text-align: right;
        padding-right: 12px;
      }
      .el-input,
      .el-select {
        width: 320px;
      }
      .el-textarea__inner {
        min-height: 100px;
        resize: vertical;
        font-size: 15px;
      }
    }
  }
  .el-dialog__footer {
    text-align: right;
    padding: 20px 32px 24px 32px;
    .el-button + .el-button {
      margin-left: 16px;
    }
  }
}